package cn.bon.schedule.api.pojo.po;

import cn.bon.schedule.api.enums.ScheduleMode;
import cn.bon.schedule.api.enums.WorkType;
import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 排班表
 * </p>
 *
 * @author LuoChao
 * @since 2023-12-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ScheduPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 方案id
     */
    @TableId(value = "schedu_plan_id")
    @Schema(description = "新增时不传该值",requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long scheduPlanId;

    /**
     * 所属组织id
     */
    @Schema(description = "所属机构id",requiredMode = Schema.RequiredMode.REQUIRED)
    private Long orgId;

    /**
     * 排班方案名称
     */
    @Schema(description = "排班方案名称",requiredMode = Schema.RequiredMode.REQUIRED)
    private String planName;

    /**
     * 班次类型
     */
    @Schema(description = "班次类型",requiredMode = Schema.RequiredMode.REQUIRED)
    private WorkType workType;

    /**
     * 排班模式：按人员，按班组
     */
    @Schema(description = "可用：按人员，按班组",requiredMode = Schema.RequiredMode.REQUIRED)
    private ScheduleMode scheduleMode;

    /**
     * 排班周期
     */
    @Schema( description="排班周期",requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDate cycle;

    /**
     * 排班规则id
     */
    @Schema(description = "排班规则id")
    private Long ruleId;

    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "修改时间",requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private LocalDateTime updateTime;

    /**
     * 删除标志位
     */
    @JsonIgnore
    private Integer delFlag = 0;


}
